﻿@model ITProject.WebUI.Models.ProjectAdmin.ProjectAdminEditReleaseViewModel
@{
    ViewBag.Title = "Edycja Wersji";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Panel administracyjny projektu @Model.ProjectName</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div class="Pmenu">
@Html.Partial(MVC.Shared.Views.Partials._ProjectMenuControl,
new ITProject.WebUI.Models.Project.ProjectMenuViewModel { ProjectName = Model.ProjectName, Role = ITProject.Domain.UserRole.Supervisor })
</div>


<div class="PAmenu">
@Html.Partial(MVC.Shared.Views.Partials._ProjectAdminMenu, new List<string> { "WP", Model.ProjectName })
@*@Html.ActionLink("Zarządzaj użytkownikami",MVC.ProjectAdmin.ActionNames.ManageTeam, MVC.ProjectAdmin.Name, new { projectName = Model }, null)*@
</div>
<div class="PAplane">

@using (Html.BeginForm("EditRelease", "ProjectAdmin", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Edycja wersji projektu</legend>
        @Html.HiddenFor(model => model.ProjectName)
         @Html.HiddenFor(model => model.ReleaseId)
        <div class="editor">
            <div class="editor-label">
                @Html.LabelFor(model => model.Name) <span class="validation">*</span>
            </div>
            <div class="editor-field">
            <p class="validation">@Html.ValidationMessageFor(model => model.Name)</p>
                @Html.TextBoxFor(model => model.Name, new { @class = "input" })
                
            </div>
        </div>
        <div class="editor">
            <div class="editor-label">
                @Html.LabelFor(model => model.Description) 
            </div>
            <div class="editor-field">
            <p class="validation">@Html.ValidationMessageFor(model => model.Description)</p>
                @Html.TextAreaFor(model => model.Description, new { @class = "input" })
                
            </div>
        </div>
                
        <div class="editor">
            <div class="editor-label">
                @Html.LabelFor(model => model.PlannedEndDate) 
            </div>
            <div class="editor-field">

            @Html.TextBoxFor(model => model.PlannedEndDate, new { @class = "cal", @Value = Model.PlannedEndDate.ToString("yyyy/MM/dd") })
            </div>
        </div>
                <p class="validation" style="padding-left:50px">        
        *pola wymagane
        </p>
        <div class="DSubmit">
        <p>
            <input type="submit" value="Zapisz" class="button"/>
        </p>
        </div>
    </fieldset>
}

</div>
<div class="clear">
</div>

